<template>
  <svg-icon
    icon-class="fullscreen"
    style="vertical-align: middle; color: #fff; margin-right: 20px; width: 20px; height: 20px; cursor: pointer"
    @click="screenFull"
  />
</template>

<script>
import ScreenFull from 'screenfull'
export default {
  name: 'VueAdminTemplateMasterIndex',

  data() {
    return {}
  },

  mounted() {},

  methods: {
    screenFull() {
      if (!ScreenFull.isEnabled) {
        this.$message.warning('此功能不可用！')
        return
      }
      ScreenFull.toggle() // 此方法不仅可以全屏也可以退出全屏
    }
  }
}
</script>

<style lang="scss" scoped></style>
